package com.ssy.lingxi.search.api.feign;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.search.api.hystrix.OrderHystrix;
import com.ssy.lingxi.search.api.model.request.OrderRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * 模板服务类
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/8/1
 */
@FeignClient(value = "search-service", fallback = OrderHystrix.class)
public interface IOrderFeign {

    /**
     * 查询会员
     * @param orderRequest
     * @return
     */
    @RequestMapping(value = "/search/commodity/order/getMemberIdList", method = RequestMethod.POST)
    Wrapper<List<Long>> getMemberIdList(@RequestBody OrderRequest orderRequest);

//    /**
//     * 查询商品列表--商品能力
//     * @param current 当前页码
//     * @param pageSize 每页条数
//     * @param categoryId 平台分类id
//     * @param customerAttributeList 属性
//     * @param provinceCode 省份行政编码
//     * @param cityCode 城市行政编码
//     * @return
//     */
//    @RequestMapping(value = "/search/commodity/order/getCommodityList", method = RequestMethod.GET)
//    Wrapper<PageData<OrderMemberResponse>> searchCommodityList(@RequestParam("current") Integer current, @RequestParam("pageSize") Integer pageSize,
//                                                                      @RequestParam(value = "categoryId",required = false) Long categoryId,
//                                                                      @RequestParam(value = "customerAttributeList",required = false) List<CustomerAttributeRequest> customerAttributeList,
//                                                                      @RequestParam(value = "provinceCode",required = false) String provinceCode,
//                                                                      @RequestParam(value = "cityCode",required = false) String cityCode);
}
